package com.flash.javamate.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * java文件解析后封装的类.
 *
 * @author sunym1993
 * @version 0.0.1-SNAPSHOT
 * @since 2018年07月15日 20时10分
 */
@Data
public class JavaFile {

    private String classPackage;
    private Map<String, String> imports = new HashMap<>();//<类名，全限定类名>
    private String className;
    private Map<String, String> annotations = new HashMap<>();//<@注解名称，括号中的值>
    private Map<String, String> fields = new HashMap<>();//<字段名称，类名>
    private List<JavaMethod> methods = new ArrayList<>();

    @Data
    public class JavaMethod {
        private String methodName;
        private Map<String, String> annotations = new HashMap<>();
        private Map<String, String> paramFields = new HashMap<>();
        private String returnFields;
    }

}
